<?php session_start(); 
  include("../../sql/connexionmysql.php");
  include("../../controlleur/utilities.php");
  $_SESSION['admin'] = 1;
  if ($_SESSION['admin'] < 1)
		header("location:/../../index.php");
  
  $matchOrder = $_GET['matchOrder'];
  $idTournamentRoundType = $_GET['idTournamentRoundType'];
  $idTournamentDraw = $_GET['idTournamentDraw'];
  global $tournamentId;
  $tournamentId = $idTournamentDraw;
  $newRound = $idTournamentRoundType + 1;
  $newMatchOrder1 = $matchOrder * 2;
  $newMatchOrder2 = $matchOrder * 2 - 1;
  addMatch($newRound, $newMatchOrder1, $idTournamentDraw, '');
  addMatch($newRound, $newMatchOrder2, $idTournamentDraw, '');

  include($ROOT . 'page/getMatchJson.php');
  ?>